
package ro.qi.framework.sys.security.entities;

import ro.qi.framework.sys.entities.Entity;

public class SecurityAccountGroupCollection extends Entity {

	public SecurityAccountGroupCollection() {
		super();
	}

	public SecurityAccountGroupCollection(int accountId) {
		super();
		setAccountId(accountId);
		select();
	}

	public void setAccountId(int value) {
		setValue("accountId", value);
	}

	public int getCollectionSize() {
		return getCollectionSize("groups");
	}

	public int getGroupId(int index) {
		return getCollectionIntValue("groups", "groupId", index);
	}

	public SecurityGroup getGroup(int index) {
		return new SecurityGroup(getGroupId(index));
	}

}
